package model

type Result struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type PodsNp struct {
	Namespace         string             `json:"namespace"`
	PodConventionInfo *PodConventionInfo `json:"pod_convention_info"`
}

type PodConventionInfo struct {
	Status       string `json:"status"`
	Name         string `json:"name"`
	Image        string `json:"image"`
	Age          int    `json:"age"`
	RestartCount int    `json:"restart_count"`
	PodIp        string `json:"pod_ip"`
	NodeName     string `json:"node_name"`
	Cpu          string `json:"cpu"`
	Memory       string `json:"memory"`
}

type PodYamlResponse struct {
	PodYaml string `json:"pod_yaml"`
}

type DeploysNp struct {
	Namespace            string                `json:"namespace"`
	DeployConventionInfo *DeployConventionInfo `json:"deploy_convention_info"`
}

type DeployConventionInfo struct {
	Status            string `json:"status"`
	Name              string `json:"name"`
	Image             string `json:"image"`
	Replicas          int32  `json:"replicas"`
	UpdatedReplicas   int32  `json:"updated_replicas"`
	ReadyReplicas     int32  `json:"ready_replicas"`
	AvailableReplicas int32  `json:"available_replicas"`
	Age               int    `json:"age"`
}

type DeployCreate struct {
	Name           string            `json:"name"`
	Namespace      string            `json:"namespace"`
	Replicas       int32             `json:"replicas"`
	Image          string            `json:"image"`
	EnvName        string            `json:"env_name"`
	EnvValue       string            `json:"env_value"`
	Label          map[string]string `json:"label"`
	LimitsCpu      string            `json:"limits_cpu"`
	LimitsMemory   string            `json:"limits_memory"`
	RequestsCpu    string            `json:"requests_cpu"`
	RequestsMemory string            `json:"requests_memory"`
	ContainerPort  int32             `json:"container_port"`
	HealthCheck    bool              `json:"health_check"`
	HealthPath     string            `json:"health_path"`
}
type DeployYamlResponse struct {
	DeployYaml string `json:"deploy_yaml"`
}

type GetNameSpaceInfo struct {
	Status string `json:"status"`
	Name   string `json:"name"`
	Age    int    `json:"age"`
}

type CreateNamespace struct {
	Name           string `json:"name"`
	LimitsCpu      string `json:"limits_cpu"`
	LimitsMemory   string `json:"limits_memory"`
	RequestsCpu    string `json:"requests_cpu"`
	RequestsMemory string `json:"requests_memory"`
}

type GetNodesList struct {
	Status  string `json:"status"`
	Name    string `json:"name"`
	Version string `json:"version"`
	Address string `json:"address"`
	Arch    string `json:"arch"`
	Cpu     string `json:"cpu"`
	Memory  string `json:"memory"`
	Age     int    `json:"age"`
}
